- - T E X T P T R   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b c d e f ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   F R O M   # t   
 
 p r i n t   @ p t r v a l   
 
 d r o p   t a b l e   # t 
 
 
 
 - - T E X T V A L I D   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b x y e f ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) ,   @ p t r v a l 2   b i n a r y ( 1 6 ) 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   F R O M   # t 
 
 i f   T E X T V A L I D ( ' # t . n ' , @ p t r v a l ) = 1 	 
 
 	 p r i n t   ' @ p t r v a l   h a s   a   v a l i d   t e x t   p o i n t e r . ' 
 
 e l s e 	 
 
 	 p r i n t   ' @ p t r v a l   h a s   a n   i n v a l i d   t e x t   p o i n t e r . ' 
 
 i f   T E X T V A L I D ( ' # t . n ' , @ p t r v a l 2 ) = 1 	 
 
 	 p r i n t   ' @ p t r v a l 2   h a s   a   v a l i d   t e x t   p o i n t e r . ' 
 
 e l s e 	 p r i n t   ' @ p t r v a l 2   h a s   a n   i n v a l i d   t e x t   p o i n t e r . ' 
 
 d r o p   t a b l e   # t 
 
 
 
 - - S E T   T E X T S I Z E   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b c d e f g h i j k ' ) 
 
 S E T   T E X T S I Z E   1 0 - - n t e x t   i s   u n i c o d e   a n d   s o   e a c h   c h a r a c t e r   t a k e s   2   b y t e s 
 
 s e l e c t   *   f r o m   # t 
 
 S E T   T E X T S I Z E   2 0 - - n t e x t   i s   u n i c o d e   a n d   s o   e a c h   c h a r a c t e r   t a k e s   2   b y t e s 
 
 s e l e c t   *   f r o m   # t 
 
 d r o p   t a b l e   # t 
 
 
 
 - - @ @ T E X T S I Z E   s a m p l e 
 
 S E T   T E X T S I Z E   1 0 - - n t e x t   i s   u n i c o d e   a n d   s o   e a c h   c h a r a c t e r   t a k e s   2   b y t e s 
 
 p r i n t   @ @ T E X T S I Z E 
 
 S E T   T E X T S I Z E   2 0 - - n t e x t   i s   u n i c o d e   a n d   s o   e a c h   c h a r a c t e r   t a k e s   2   b y t e s 
 
 p r i n t   @ @ T E X T S I Z E 
 
 
 
 - - W R I T E T E X T   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b c ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   
 
 F R O M   # t 
 
 W R I T E T E X T   # t . n   @ p t r v a l   ' d e f ' 
 
 s e l e c t   *   f r o m   # t 
 
 d r o p   t a b l e   # t 
 
 
 
 - - U P D A T E T E X T   s a m p l e   o n l y   i n s e r t i o n 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' b d ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) ,   @ i   i n t 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   
 
 F R O M   # t 
 
 U P D A T E T E X T   # t . n   @ p t r v a l   0   0   ' a ' - - i n s e r t   a t   t h e   b e g g i n i n g 
 
 s e l e c t   *   f r o m   # t 
 
 U P D A T E T E X T   # t . n   @ p t r v a l   2   0   ' c ' - - i n s e r t   i n   t h e   m i d d l e 
 
 s e l e c t   *   f r o m   # t 
 
 s e t   @ i = ( s e l e c t   D A T A L E N G T H ( n )   f r o m   # t ) / 2 - - / 2   o n l y   i f   n t e x t   b e c a u s e   u n i c o d e   t a k e s   2   b y t e s 
 
 p r i n t   @ i 
 
 U P D A T E T E X T   # t . n   @ p t r v a l   @ i   0   ' e ' - - i n s e r t   a t   t h e   e n d 
 
 s e l e c t   *   f r o m   # t 
 
 d r o p   t a b l e   # t 
 
 
 
 - - U P D A T E T E X T   s a m p l e   d e l e t i o n + i n s e r t i o n 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b x y e f ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) ,   @ i   i n t 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   
 
 F R O M   # t 
 
 U P D A T E T E X T   # t . n   @ p t r v a l   2   2   ' c d ' - - i n s e r t   2   a n d   d e l e t e   o t h e r   2   c h a r a c t e r s 
 
 - - s t a r t i n g   a t   p o s i t i o n   2 
 
 s e l e c t   *   f r o m   # t 
 
 d r o p   t a b l e   # t 
 
 
 
 - - R E A D T E X T   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' a b c d e f g h i j k ' ) 
 
 D E C L A R E   @ p t r v a l   b i n a r y ( 1 6 ) 
 
 S E L E C T   @ p t r v a l   =   T E X T P T R ( n )   F R O M   # t 
 
 R E A D T E X T   # t . n   @ p t r v a l   3   8 - - r e a d   8   c h a r a c t e r s   s t a r t i n g   a t   p o s i t i o n   3 
 
 d r o p   t a b l e   # t 
 
 
 
 - - D A T A L E N G T H   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' 1 2 3 4 5 6 7 8 9 0 ' ) 
 
 D E C L A R E   @ i   i n t 
 
 s e t   @ i = ( s e l e c t   D A T A L E N G T H ( n )   f r o m   # t ) - - i t   s h o u l d   r e t u r n   t h e   l e n g h t   i n   b y t e s = 2 * U N I C O D E   l e n g t h 
 
 P R I N T   @ i 
 
 d r o p   t a b l e   # t 
 
 
 
 - - P A T I N D E X   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 D E C L A R E   @ i   i n t 
 
 S E L E C T   P A T I N D E X ( ' % t i m % ' ,   n )   F R O M   # t 
 
 S E L E C T   P A T I N D E X ( ' % t i m e % ' ,   n )   F R O M   # t 
 
 d r o p   t a b l e   # t 
 
 
 
 - - C O N V E R T   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 D E C L A R E   @ c   n v a r c h a r ( 5 ) 
 
 S E T   @ c = ( s e l e c t   c o n v e r t ( n v a r c h a r ( 5 ) , n )   f r o m   # t ) 
 
 p r i n t   @ c 
 
 d r o p   t a b l e   # t 
 
 
 
 - - C O N V E R T   s a m p l e 
 
 c r e a t e   t a b l e   # t   ( n   n t e x t ) 
 
 i n s e r t   # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 D E C L A R E   @ c   n v a r c h a r ( 5 ) 
 
 S E T   @ c = ( s e l e c t   C A S T   (   n     A S   n v a r c h a r ( 5 )   )   f r o m   # t ) 
 
 p r i n t   @ c 
 
 d r o p   t a b l e   # t 
 
 
 
 - - s a v e o b j   s a m p l e ,   s a v i n g   o b j e c t   h e l l o 
 
 e x e c   s a v e o b j   ' c : \ h e l l o . s q l ' ,   ' h e l l o ' 
 
 
 
 - - r e a d o b j   s a m p l e ,   r e a d i n g   o b j e c t   h e l l o 
 
 e x e c   r e a d o b j   ' c : \ h e l l o . s q l ' 
 
 
 
 - - s a v e I m a g e 2 f i l e   s a m p l e 
 
 e x e c   s a v e I m a g e 2 f i l e   ' c : \ C a t e g o r y 1 . b a k ' ,   ' N o r t h w i n d . . C a t e g o r i e s ' ,   ' P i c t u r e ' ,   ' w h e r e   c a t e g o r y i d = 1 ' 
 
 
 
 - - s a v e T e x t 2 f i l e   s a m p l e 
 
 c r e a t e   t a b l e   # # t   ( n   t e x t ) 
 
 i n s e r t   # # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 E X E C   s a v e T e x t 2 f i l e   ' c : \ t e s t . t x t ' ,   ' # # t ' , ' n ' ,   ' ' 
 
 d r o p   t a b l e   # # t 
 
 
 
 - - s a v e N t e x t 2 f i l e   s a m p l e 
 
 c r e a t e   t a b l e   # # t   ( n   n t e x t ) 
 
 i n s e r t   # # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 E X E C   s a v e N t e x t 2 f i l e   ' c : \ t e s t . t x t ' ,   ' # # t ' , ' n ' ,   ' ' 
 
 d r o p   t a b l e   # # t 
 
 
 
 - - r e a d I m a g e F r o m f i l e   s a m p l e   
 
 - - r e a d i n g   a   t e x t   c o l u m n   f r o m   a   f i l e 
 
 c r e a t e   t a b l e   # # t   ( n   t e x t ) 
 
 i n s e r t   # # t   v a l u e s ( ' H e l l o   T i m ,   l o n g   t i m e   n o   s e e ! ' ) 
 
 E X E C   r e a d I m a g e F r o m f i l e   ' c : \ h e l l o . t x t ' ,   ' # # t ' , ' n ' ,   ' ' 
 
 s e l e c t   *   f r o m   # # t 
 
 d r o p   t a b l e   # # t 